package cn.walls1717.mall.modules.ums.controller;


import cn.walls1717.mall.common.api.CommonResult;
import cn.walls1717.mall.modules.ums.model.UmsMemberLevel;
import cn.walls1717.mall.modules.ums.service.UmsMemberLevelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 会员等级表 前端控制器
 *
 * @author walls1717
 * @since 2022-4-9
 */
@RestController
@RequestMapping("/memberLevel")
public class UmsMemberLevelController {

    @Autowired
    UmsMemberLevelService memberLevelService;

    @GetMapping(path = "/list")
    public CommonResult<List<UmsMemberLevel>> list(
            @RequestParam(value = "defaultStatus", defaultValue = "0") Integer defaultStatus) {
        List<UmsMemberLevel> list = memberLevelService.list(defaultStatus);
        return CommonResult.success(list);
    }
}

